package crp.core.course.app;

import crp.core.course.domain.services.CourseEditor;
import crp.core.course.domain.services.CourseSearcher;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Instance;
import javax.inject.Inject;

@ApplicationScoped
public class CourseService {
    private final Instance<CourseSearcher> searchers;
    private final Instance<CourseEditor> editors;

    @Inject
    public CourseService(Instance<CourseSearcher> searchers, Instance<CourseEditor> editors) {
        this.searchers = searchers;
        this.editors = editors;
    }

    public CourseSearcher searcher() {
        return searchers.get();
    }

    public CourseEditor editor() {
        return editors.get();
    }
}
